Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solaris build environment should include libsendfile/liblgrp #94976

Merged
merged 1 commit into from
Mar 20, 2022

Conversation

jclulow
Copy link
Contributor

@jclulow jclulow commented Mar 15, 2022

As of version 0.2.120 of the libc crate, the solaris target now requires
some additional libraries to be present in the sysroot. Note that the
solaris target doesn't really build against files from Solaris, but
rather against some files from DilOS (a platform similar to both Solaris
and illumos). Pull in the extra libraries and their compilation links
from that apt repository.

This aims to assist with #94052.

As of version 0.2.120 of the libc crate, the solaris target now requires
some additional libraries to be present in the sysroot.  Note that the
solaris target doesn't really build against files from Solaris, but
rather against some files from DilOS (a platform similar to both Solaris
and illumos).  Pull in the extra libraries and their compilation links
from that apt repository.
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 15, 2022
@jclulow
Copy link
Contributor Author

jclulow commented Mar 15, 2022

Note that I've looked in the apt repository I believe this docker image uses, and found the files I would expect to see, via:

#!/bin/bash

set -o errexit
set -o pipefail

REPO=https://apt.dilos.org/dilos
A=dilos2
B=main

printf 'loading package manifest...\n'
pkgs=$(curl -sSf -L "$REPO/dists/$A/$B/binary-solaris-i386/Packages.gz" |
    gunzip)

function file_for {
         awk -v "p=$1" '
                $1 == "Package:" && $2 == p { q = 1; }
                /^$/ { q = 0; }
                q && $1 == "Filename:" { print $2; }' <<< "$pkgs"
}

files=(
        $(file_for libsendfile)
        $(file_for libsendfile-dev)
        $(file_for liblgrp)
        $(file_for liblgrp-dev)
)

td="$(mktemp -d)"

for f in "${files[@]}"; do
        b=$(basename "$f")
        printf 'package: %s\n' "$b"
        curl -sSfL -o "$td/$b" "$REPO/$f"
        7z -so x "$td/$b" 2>/dev/null | tar tvf - | sed 's/^/  /'
        printf '\n'
done

rm -rf "$td"

This gives output:

loading package manifest...
package: libsendfile_2.0.2.48_solaris-i386.deb
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./lib/
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./lib/amd64/
  -rwxr-xr-x   0/2    13904 Oct 30 10:20 2019 ./lib/amd64/libsendfile.so.1
  -rwxr-xr-x   0/2     8556 Oct 30 10:20 2019 ./lib/libsendfile.so.1
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./usr/
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./usr/lib/
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./usr/lib/amd64/
  -rwxrwxrwx   0/0       35 Oct 30 10:20 2019 ./usr/lib/amd64/libsendfile.so.1 symbolic link to ../../../lib/amd64/libsendfile.so.1
  -rwxrwxrwx   0/0       26 Oct 30 10:20 2019 ./usr/lib/libsendfile.so.1 symbolic link to ../../lib/libsendfile.so.1

package: libsendfile-dev_2.0.2.48_solaris-i386.deb
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./lib/
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./lib/amd64/
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./usr/
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./usr/lib/
  -rwxr-xr-x   0/0        0 Oct 30 10:20 2019 ./usr/lib/amd64/
  -rwxrwxrwx   0/0       16 Oct 30 10:20 2019 ./lib/amd64/libsendfile.so symbolic link to libsendfile.so.1
  -rwxrwxrwx   0/0       16 Oct 30 10:20 2019 ./lib/libsendfile.so symbolic link to libsendfile.so.1
  -rwxrwxrwx   0/0       35 Oct 30 10:20 2019 ./usr/lib/amd64/libsendfile.so symbolic link to ../../../lib/amd64/libsendfile.so.1
  -rwxrwxrwx   0/0       26 Oct 30 10:20 2019 ./usr/lib/libsendfile.so symbolic link to ../../lib/libsendfile.so.1

package: liblgrp_2.0.2.48_solaris-i386.deb
  -rwxr-xr-x   0/0        0 Oct 30 10:19 2019 ./
  -rwxr-xr-x   0/0        0 Oct 30 10:19 2019 ./usr/
  -rwxr-xr-x   0/0        0 Oct 30 10:19 2019 ./usr/lib/
  -rwxr-xr-x   0/0        0 Oct 30 10:19 2019 ./usr/lib/amd64/
  -rwxr-xr-x   0/2    20984 Oct 30 10:19 2019 ./usr/lib/amd64/liblgrp.so.1
  -rwxr-xr-x   0/2    19468 Oct 30 10:19 2019 ./usr/lib/liblgrp.so.1

package: liblgrp-dev_2.0.2.48_solaris-i386.deb
  -rwxr-xr-x   0/0        0 Oct 30 10:19 2019 ./
  -rwxr-xr-x   0/0        0 Oct 30 10:19 2019 ./usr/
  -rwxr-xr-x   0/0        0 Oct 30 10:19 2019 ./usr/lib/
  -rwxr-xr-x   0/0        0 Oct 30 10:19 2019 ./usr/lib/amd64/
  -rwxrwxrwx   0/0       12 Oct 30 10:19 2019 ./usr/lib/amd64/liblgrp.so symbolic link to liblgrp.so.1
  -rwxrwxrwx   0/0       14 Oct 30 10:19 2019 ./usr/lib/liblgrp.so symbolic link to ./liblgrp.so.1

Will the CI pipeline produce the new docker image (dist-various-2) and use that to build the solaris target for this change, or do we need to do something extra to test that?

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=iffy

Will the CI pipeline produce the new docker image (dist-various-2) and use that to build the solaris target for this change, or do we need to do something extra to test that?

Yep, this'll automatically rebuild the docker image and use that going forward.

@bors
Copy link
Contributor

bors commented Mar 17, 2022

📌 Commit 0dcb175 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 17, 2022
@bors
Copy link
Contributor

bors commented Mar 18, 2022

⌛ Testing commit 0dcb175 with merge 442ea85c0cd3580482c8770a136fcc5cf7feb1e4...

@bors
Copy link
Contributor

bors commented Mar 18, 2022

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 18, 2022
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@Mark-Simulacrum
Copy link
Member

@bors retry dist-i586-gnu-i586-i686-musl timed out in ui tests

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 18, 2022
@bors
Copy link
Contributor

bors commented Mar 18, 2022

⌛ Testing commit 0dcb175 with merge 311b962c39fc7eb88e6d977272d45253ef4489b3...

@bors
Copy link
Contributor

bors commented Mar 18, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 18, 2022
@tmiasko
Copy link
Contributor

tmiasko commented Mar 18, 2022

@bors retry x86_64-apple-2: The hosted runner: GitHub Actions 47 lost communication with the server.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 18, 2022
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Mar 20, 2022

⌛ Testing commit 0dcb175 with merge 183090f...

@bors
Copy link
Contributor

bors commented Mar 20, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 183090f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 20, 2022
@bors bors merged commit 183090f into rust-lang:master Mar 20, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 20, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (183090f): comparison url.

Summary: This benchmark run did not return any relevant results.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants